
/*
 * This is the extension activity for the 'channel declaration'
 * activity associated with service '{http://www.pi4soa.org/AuctionHouseBuyer}Buyer'
 * and behavior 'main_Buyer'. The name of the channel
 * declaration is 'AuctionHouseChannel'.
 */
package org.pi4soa.auctionhousebuyer.buyer.main_buyer;

import org.pi4soa.service.extensions.DefaultActivityExtension;
import org.pi4soa.service.extensions.ChannelCreationExtension;
import org.pi4soa.service.extensions.ExtensionContext;
import org.pi4soa.service.extensions.SemanticAnnotations;
import org.pi4soa.service.EndpointReference;
import org.pi4soa.service.ServiceException;
import org.pi4soa.service.DeferProcessingException;
import org.pi4soa.service.registry.ServiceRegistry;

/**
 * This class has been autogenerated to implement the custom
 * channel creation within a service endpoint description.
 */
public class AuctionHouseChannelChannel extends DefaultActivityExtension
					implements ChannelCreationExtension {

	/**
	 * The constructor for the channel creation extension.
	 */
	public AuctionHouseChannelChannel() {
	}
	
	/**
	 * This method returns the endpoint reference associated with
	 * the channel represented by the supplied details.<p>
	 * <p>
	 * If semantic annotations are provided, these may be associated
	 * with either the channel type or channel variable, and can be
	 * used to determine characteristics of the endpoint that is
	 * returned, such as the level of security supported, or other
	 * quality of service parameters.
	 * 
	 * @param context The context
	 * @param serviceType The service type
	 * @param endpointReferenceType The endpoint reference data type
	 * @param registry The service registry
	 * @param semantics The semantic annotations, or null if not relevant
	 * @return The endpoint reference
	 * @exception DeferProcessingException Suspend processing
	 * @exception ServiceException Failed to get message content
	 */
	public EndpointReference discover(ExtensionContext context,
			String serviceType, String endpointReferenceType,
				ServiceRegistry registry, SemanticAnnotations semantics)
							throws DeferProcessingException, ServiceException {
		EndpointReference ret=null;
		
		// Default implementation of the channel creation behavior,
		// to obtain an endpoint from the service registry based
		// on the supplied service type and endpoint reference type
		ret = registry.discover(serviceType, endpointReferenceType);
		
		return(ret); 
	}
}	